package zl.bean;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class Novel {
    @ExcelProperty("id")
    private Integer id;
    @ExcelProperty("小说名")
    @NotBlank(message = "小说名不能为空")
    private String name;
    @ExcelProperty("上级id")
    @NotNull(message = "小说类别不能为空")
    private Integer category_id;
    @ExcelProperty("上级类别名")
    private String category;
    @ExcelProperty("图片地址")
    private String image;
    @ExcelProperty("简介")
    private String summary;
    @NotNull(message = "小说作者名不能为空")
    @ExcelProperty("作者id")
    private Integer user_id;
    @ExcelProperty("作者用户名")
    private String author;
    private Integer state;
    private Integer count;
}
